home *** CD-ROM | disk | FTP | other *** search
- head 1.2;
- branch 1.2.1.99;
- access;
- symbols;
- locks; strict;
- comment @ * @;
-
-
- 1.2
- date 93.01.26.22.38.50; author jason; state Exp;
- branches
- 1.2.1.1;
- next ;
-
- 1.2.1.1
- date 94.03.29.05.41.32; author jason; state Exp;
- branches;
- next 1.2.1.2;
-
- 1.2.1.2
- date 94.11.16.06.29.47; author jason; state Exp;
- branches;
- next 1.2.1.3;
-
- 1.2.1.3
- date 94.12.09.05.29.56; author jason; state Exp;
- branches;
- next ;
-
-
- desc
- @second mouse icon
- @
-
-
- 1.2
- log
- @Initial RCS Version
- @
- text
- @#include"agl.h"
-
- #define SPRITESPACE 4
- #define SPRITELINES 7
-
- struct SimpleSprite MouseSprite;
-
- UBYTE *SpriteChip;
-
- UBYTE SpriteData[SPRITESPACE*SPRITELINES]=
- {
- 0,0, 0,0, /* position,control */
-
- 0x20,0x00,0x00,0x00,
- 0x20,0x00,0x00,0x00,
- 0xF8,0x00,0x00,0x00,
- 0x20,0x00,0x00,0x00,
- 0x20,0x00,0x00,0x00,
-
- 0,0, 0,0, /* end */
- };
-
- long SpriteID= -1;
-
-
-
- /******************************************************************************
- void create_mousesprite(void)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void create_mousesprite(void)
- {
- SpriteChip=AllocMem(SPRITESPACE*SPRITELINES,MEMF_CHIP);
- memcpy(SpriteChip,SpriteData,SPRITESPACE*SPRITELINES);
-
- SpriteID=GetSprite(&MouseSprite,3);
- if(SpriteID!=3)
- {
- GL_error("Error creating mouse sprite");
- SpriteID= -1;
- return;
- }
-
- MouseSprite.height=SPRITELINES-2;
-
- SetRGB4(GLView,21,15,0,0);
- SetRGB4(GLView,22,0,15,0);
- SetRGB4(GLView,23,0,0,15);
-
- ChangeSprite(GLView,&MouseSprite,SpriteChip);
- printf("Sprite Created\n");
-
- move_mousesprite(0,0);
- }
-
-
- /******************************************************************************
- void move_mousesprite(long mx,long my)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void move_mousesprite(long mx,long my)
- {
- static long lastx= -1,lasty= -1;
-
- if(mx!=lastx || my!=lasty)
- {
- WaitBOVP(GLView);
- MoveSprite(GLView,&MouseSprite,mx-6,SCREENY-my-5);
- /* printf("Sprite Moved %d %d\n",mx,my); */
-
- lastx=mx;
- lasty=my;
- }
- }
-
-
- /******************************************************************************
- void free_mousesprite(void)
-
- ******************************************************************************/
- /*PROTOTYPE*/
- void free_mousesprite(void)
- {
- FreeSprite(SpriteID);
- FreeMem(SpriteChip,SPRITESPACE*SPRITELINES);
- printf("Sprite Freed\n");
- }
- @
-
-
- 1.2.1.1
- log
- @Added RCS Header
- @
- text
- @a0 16
-
- /******************************************************************************
-
- $Id: sprite.c,v 1.2.1.1 2002/03/26 22:04:22 jason Exp jason $
-
- $Log: sprite.c,v $
- * Revision 1.2.1.1 2002/03/26 22:04:22 jason
- * Added RCS Header
- *
- * Revision 1.2.1.1 2002/03/26 22:00:51 jason
- * RCS/agl.h,v
- *
-
- ******************************************************************************/
-
-
- d70 1
- a70 1
- MoveSprite(GLView,&MouseSprite,mx-6,GLScreen->Height-my-5);
- @
-
-
- 1.2.1.2
- log
- @added NOT_EXTERN check
- @
- text
- @d4 1
- a4 1
- $Id: sprite.c,v 1.2.1.1 1994/03/29 05:41:32 jason Exp jason $
- a6 3
- * Revision 1.2.1.1 1994/03/29 05:41:32 jason
- * Added RCS Header
- *
- a16 1
- #ifndef NOT_EXTERN
- a17 1
- #endif
- @
-
-
- 1.2.1.3
- log
- @added copyright
- @
- text
- @d1 1
- d4 1
- a4 4
- Copyright © 1994 Jason Weber
- All Rights Reserved
-
- $Id: sprite.c,v 1.2.1.2 1994/11/16 06:29:47 jason Exp jason $
- a6 3
- * Revision 1.2.1.2 1994/11/16 06:29:47 jason
- * added NOT_EXTERN check
- *
- @
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-